<template>
	<view class="columnbox wdh-100 content">
		<view class="one-info rowbox spb wdh-100" @click="showDocument('1')">
			<view class="rowbox">
				<!-- <image src="../../static/img/wdcf.svg" mode="widthFix"></image> -->
				用户协议
			</view>
			<u-icon name="arrow-right" size="28rpx"></u-icon>
		</view>
		<view class="one-info rowbox spb wdh-100" @click="showDocument('2')">
			<view class="rowbox">
				<!-- <image src="../../static/img/wdcf.svg" mode="widthFix"></image> -->
				隐私协议
			</view>
			<u-icon name="arrow-right" size="28rpx"></u-icon>
		</view>
		<view class="one-info rowbox spb wdh-100" @click="resetPassword">
			<view class="rowbox">
				<!-- <image src="../../static/img/wdcf.svg" mode="widthFix"></image> -->
				修改密码
			</view>
			<u-icon name="arrow-right" size="28rpx"></u-icon>
		</view>
		<!-- <view class="one-info rowbox spb wdh-100" @click="deletAccount">
			<view class="rowbox">
				注销账号
			</view>
			<u-icon name="arrow-right" size="28rpx"></u-icon>
		</view> -->
		<view @click="quitLog" class="rowbox quit-btn">退出登录</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			resetPassword() {
				uni.navigateTo({
					url: '/packageA/resetPassword/resetPassword'
				})
			},
			showDocument(type) {
				uni.navigateTo({
					url: '/packageA/document/document?type=' + type
				})
			},
			deletAccount() {
				uni.navigateTo({
					url: './deletAccount'
				})
				// uni.showModal({
				// 	title: '是否确认注销账号？',
				// 	content: '注销后账号不可恢复',
				// 	confirmText: '确认注销',
				// 	success: (res) => {
				// 		if (res.confirm) {
				// 			this.$req.post('/doctor/zhuxiao', {
				// 				doctorid: uni.getStorageSync('uid')
				// 			}).then(res => {
				// 				uni.clearStorageSync()
				// 				this.$store.dispatch('actionsHandleIsLoginChange', false);
				// 				uni.navigateBack()
				// 			})

				// 		}
				// 	}
				// })
			},
			quitLog() {
				uni.showModal({
					title: '是否退出登录',
					success: (res) => {
						if (res.confirm) {
							getApp().globalData.conn.close();
							uni.clearStorageSync()
							this.$store.dispatch('actionsHandleIsLoginChange', false);
							uni.navigateBack()
						}
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.one-info {
		background: #fff;
		padding: 32rpx 40rpx;
		font-size: 28rpx;
		border-bottom: #F5F8FB solid 1px;

		image {
			width: 50rpx;
			height: 50rpx;
			margin-right: 20rpx;
		}
	}

	.quit-btn {
		width: 600rpx;
		border: #e0e4ea solid 1px;
		height: 90rpx;
		margin-top: 40rpx;
		border-radius: 20rpx;
		font-size: 28rpx;
		color: #00b6b2;
		position: fixed;
		bottom: 70rpx;
	}
</style>